package com.lucifer.cloud.boot.blog.chat.service.domain.bo;
import cn.hutool.json.JSONUtil;
import lombok.Data;
import org.postgresql.util.PGobject;
import java.util.Map;


/**
 * @author lucifer
 * @date 2025/3/6 16:26
 */
@Data
public class ChatMemoryBo {
    private String id;
    private String content;
    private String metadataJson;
    private Map metadata;
    PGobject embedding;

    public ChatMemoryBo() {
    }

    public ChatMemoryBo(ChatMemoryBo chatMemoryBo) {
        this.id = chatMemoryBo.getId();
        this.content = chatMemoryBo.getContent();
        this.metadata =  JSONUtil.toBean(chatMemoryBo.getMetadataJson(), Map.class);
        this.embedding = chatMemoryBo.getEmbedding();
    }



}
